#ifndef __INVENTORY_EVENT_H__
#define __INVENTORY_EVENT_H__

#include "Server/Events.h"

using namespace PocketSurvival;

namespace BedWars
{
    class BedWarsCore;

    class InventoryEvent : public IInventoryEvent, public IInventoryOpenEvent
    {
    private:
        BedWarsCore *m_bedWarsCore;

    public:
        InventoryEvent(BedWarsCore * bedWarsCore);
        virtual bool openPointInventory(std::shared_ptr<PlayerData> playerData, const Point3 &point, IInventory *inventory) override;
        virtual bool playerHandleMoveItem(std::shared_ptr<PlayerData> playerData, IInventory *sourceInventory, uint32_t sourceSlotIndex, IInventory *targetInventory, int32_t targetSlotIndex, uint32_t count) override;
        virtual bool playerHandleDragDrop(std::shared_ptr<PlayerData> playerData, IInventory *sourceInventory, uint32_t sourceSlotIndex, DragMode dragMode, IInventory *targetInventory, uint32_t targetSlotIndex, bool processingOnly) override;
        virtual bool playerDrapDrop(ComponentPlayer *componentPlayer, const Vector3 &dropVelocity, IInventory *inventory, uint32_t slotIndex, uint32_t count) override;

    };

    inline InventoryEvent::InventoryEvent(BedWarsCore * bedWarsCore) : m_bedWarsCore(bedWarsCore) {}

} // namespace BedWars

#endif
